<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录 - 氿上网</title>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/global.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/style.css" />
</head>
<body>
 
<?php echo $this->fetch('top.html'); ?>
<?php echo $this->fetch('header.html'); ?> 
 

<div id="main">
  <div class="user_login_reight">
    <div class="main_login_left left" id="main_regist_left"> <img src="<?php echo $this->_var['images_path']; ?>/login_logo.png" />
      
      <?php echo $this->fetch('message.html'); ?>
      <form id="register_form" action="<?php echo $this->_var['site_url']; ?>user/register" method="post">
        <table>
          <tr>
            <td><span class="error">*</span> 用 户 名 ：</td>
            <td><input type="text" id="username" name="username" class="text"/></td>
            <td>2-12个汉字英文字母数字</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 密&nbsp; &nbsp; &nbsp; &nbsp;码 ：</td>
            <td><input type="password" id="password" name="password" class="text"/></td>
            <td>6-8个字符，必须由数字和字母组成</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 确认密码 ：</td>
            <td><input type="password" id="confim_password" name="confim_password" class="text"/></td>
            <td>请再次输入登录口令</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 邮&nbsp; &nbsp; &nbsp; &nbsp;箱 ：</td>
            <td><input type="text" id="email" name="email" class="text"/></td>
            <td>请输入您的正确邮箱，便于通过邮箱激活找回密码</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 公司性质 ：</td>
            <td><select>
                <option value="">请选择</option>
              </select></td>
            <td>请准确输入公司性质，便于向您推荐信息</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 工作性质 ：</td>
            <td><select>
                <option value="">请选择</option>
              </select></td>
            <td>请准确输入工作性质，便于向您推荐信息</td>
          </tr>
          <tr>
            <td><span class="error">*</span> 验 证 码 ：</td>
            <td><input type='text' id='captcha' name='captcha' class='text'/> </td>
            <td><?php echo $this->_var['captcha']; ?><br/><span><a href="javascript:reloadcode();">换另外一个图</a></span></td>
          </tr>
        </table>
        <div class="main_regist_button">
          <input type="submit" class="btnzc" value="立即注册"/>
          &nbsp;
          <input type="checkbox" checked="checked" id="agree" name="agree"/>
          <label for="agree">我已经阅读并接受<a href="#">《氿上个人用户协议》</a>的协议 </label></div>
      </form>
    </div>
    <div class="main_login_right right" id="main_regist_right">
      <div class="righttop">
        <p>我已经有账户了</p>
        <a href="<?php echo $this->_var['site_url']; ?>user/login">登 录</a>
      </div>
      <div class="rightmain">
        <p>我的商城</p>
        <a href="">商城活动</a> <a href="">分类</a> <a href="">积分</a> <a href="">最新活动</a> </div>
      <div class="rightmain">
        <p>我的知道</p>
        <a href="">提问难题</a> <a href="">分类</a> <a href="">积分</a> <a href="">回答</a> </div>
      <div class="rightmain">
        <p>我的需求</p>
        <a href="">商城活动</a> <a href="">分类</a> <a href="">积分</a> <a href="">最新活动</a> </div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<div class="clear"></div>
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/message.js"></script> 
<script type="text/javascript" src="<?php echo $this->_var['js_path']; ?>/jquery.validate.js"></script>  
<script type="text/javascript"> 
   function reloadcode(){
        document.getElementById('captcha_change').src = '<?php echo $this->_var['site_url']; ?>captcha/default?r='+Math.random(); ;
    } 

    $(function(){
        $("#register_form").validate({
			 errorElement:"p",
             rules: {
                username: {
                    required: true,
                    minlength: 6,
                    maxlength:20
                },
                password: {
                    required: true,
                    minlength: 6,
                    maxlength:20
                },
                confim_password: {
					required: true,
					minlength: 6,
					maxlength:20,
					equalTo: "#password"
				},
                email: {
                    required: true,
                    email: true
                },
                sex: "required",
                province: "required",
                captcha: "required",
				agree:"required"
            
            },
            messages: {
                username: {
				required: "用户名不能为空!",
				minlength: "必须大于6位小于20位!",
				maxlength: "必须大于6位小于20位!"
			},
			password: {
				required: "密码不能为空!",
				minlength: "必须大于6位小于20位!",
								 maxlength: "必须大于6位小于20位!"
			},
			confim_password: {
				required: "密码确认不能为空",
				minlength: "必须大于6位小于20位!",
				maxlength: "必须大于6位小于20位!",
				equalTo: "和密码不一致!"
			},
			email: {
				required: "邮箱不能为空!",
				email: "E-mail格式不正确!"
			},
			sex: "请选择性别!",
			province: "请选择所在地!",
			captcha: "请输入验证码！",
			agree: "请同意此协议！"
		   }
		});
    })
   
</script> 
 
<?php echo $this->fetch('footer.html'); ?>
</body>
</html>
